package cn.js.controller;

import cn.hutool.core.date.DateUtil;
import cn.js.annotation.MyLog;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/test")
public class Maintest {

    @GetMapping("/deve")
    public void devtest() {
        String dateStr = "2017-03-01T14:00:00";
        String dates = dateStr.replace("T", "");
        Date date = DateUtil.parse(dates, "yyyy-MM-dd HH:mm:ss");
        System.out.printf("----", date);
    }


    @GetMapping("/deleteById")
    @MyLog(title = "用户模块", content = "删除用户操作")
    public String deleteById(){
        //这里具体删除用户代码 省略.....
        return "这里具体删除用户代码成功 省略.....";
    }


    @GetMapping("/deleteUserById")
    @MyLog(title = "用户模块", content = "删除用户操作")
    public String deleteUserById(){
        //这里具体删除用户代码 省略.....
        int a=1/0;
        return "这里具体删除用户代码 省略.....";
    }
}